-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update helpers.js #350
Update helpers.js #350
Conversation
The previous regex was catching lines with scientific notation (ending in E or e) as bad lines - continuously writing to the statsd.log file, (using lots of I/O). Also added 'Na' to regex to prevent NaN messages being logged continuously.
Thanks for the patch. Can you add tests for this change so it doesn't break in the future? |
I'll be working on it a bit in the future and will add tests if I have a On Sat, Oct 19, 2013 at 8:43 PM, Daniel Schauenberg <
|
This commit introduces following changes: * Be liberal in what you recieve - do not rely on regexps for packet parsing but instead accept anything that can be parsed by JavaScript as a number e.g: +1e-17, -0511, 0xDEADbeef, etc * Accept both positive and negative counters with explicit / implicit sign * Provides more strict error checking then regexp, for example following strings match previously used '([\-\+\d\.]+' regexp: . .123. .\-+\0\+-.1- Also while here added more tests. Closes: statsd#350 statsd#357 Signed-off-by: Alexey Ivanov <SaveTheRbtz@GMail.com> Signed-off-by: Alexey Ivanov <aivanov@linkedin.com>
This commit introduces following changes: * Be liberal in what you recieve - do not rely on regexps for packet parsing but instead accept anything that can be parsed by JavaScript as a number e.g: +1e-17, -0511, 0xDEADbeef, etc * Accept both positive and negative counters with explicit / implicit sign * Provides more strict error checking then regexp, for example following strings match previously used '([\-\+\d\.]+' regexp: . .123. .\-+\0\+-.1- Also while here added more tests. Closes: statsd#350 statsd#357 Signed-off-by: Alexey Ivanov <SaveTheRbtz@GMail.com>
This commit introduces following changes: * Be liberal in what you recieve - do not rely on regexps for packet parsing but instead accept anything that can be parsed by JavaScript as a number e.g: +1e-17, -0511, 0xDEADbeef, etc * Accept both positive and negative counters with explicit / implicit sign * Provides more strict error checking then regexp, for example following strings match previously used '([\-\+\d\.]+' regexp: . .123. .\-+\0\+-.1- Also while here added more tests. Closes: statsd#350 statsd#357 Signed-off-by: Alexey Ivanov <SaveTheRbtz@GMail.com>
fixed via #382 |
The previous regex was catching lines with scientific notation (ending in E or e) as bad lines - continuously writing to the statsd.log file, (using lots of I/O).
Also added 'Na' to regex to prevent NaN messages being logged continuously.